package cn.itlaobing.web.filter;

import cn.itlaobing.web.filter.sitemeshtag.CssJsTag;
import org.sitemesh.builder.SiteMeshFilterBuilder;
import org.sitemesh.config.ConfigurableSiteMeshFilter;

import javax.servlet.annotation.WebFilter;

/**
 * 类名: cn.itlaobing.web.filter
 * 功能:
 * 作者: 王博
 * 日期: 2017/11/13 15:02
 */
@WebFilter("/*")
public class SiteMeshFilter extends ConfigurableSiteMeshFilter {
    @Override
    protected void applyCustomConfiguration(SiteMeshFilterBuilder builder) {
        builder.addDecoratorPath("/**","/WEB-INF/views/layout/application.jsp")
            .addExcludedPath("/assets/**")
            .addTagRuleBundle(new CssJsTag());
    }
}
